home *** CD-ROM | disk | FTP | other *** search
- Path: gatekeeper.liffe.com!usenet
- From: jonathan.burton@liffe.com (Jonathan Burton)
- Newsgroups: comp.lang.c++
- Subject: Re: Window sizes with VC++ and MFC
- Date: Fri, 12 Jan 1996 16:45:01 +0000 (GMT)
- Organization: London International Financial Futures Exchange
- Message-ID: <4d63p0$8u4@gatekeeper.liffe.com>
- References: <nntpuserDL2oLp.BAC@netcom.com>
- NNTP-Posting-Host: rrt1.liffe.com
- X-Newsreader: Forte Free Agent v0.38
-
- greg@netlanta.com (Greg Colin) wrote:
-
- >I am creating code with AppWizard for an SDI application and want the window to
- >be a fized size, and without WS_THICKFRAME. I have fried overriding
- >CMainFrame::Create to use a RECT structure that I have set to the values I want,
- >but this does not work.
-
- >After a couple of hours looking through the online documentation (curses to
- >Micro$oft for not providing printed manuals with the software), I am posting
- >here in the hope that someone will take pity on a clueless newbie.
-
- >Thanks a lot
- >Greg
-
- Try something like this:-
-
- // in OnCreate
- SetWindowPos( NULL, 0, 0, 640, 480, SWP_NOACTIVATE );
- CenterWindow();
-
- // PreCreateWindow
-
- BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs)
- {
- cs.style &= ~(FWS_ADDTOTITLE);
- cs.style &= ~(WS_THICKFRAME);
- cs.style |= WS_BORDER;
-
- return CFrameWnd::PreCreateWindow(cs);
- }
-
-
- Jonathan Burton (jonathan.burton@liffe.com)
-
-